package com.ruoyi.withdraw.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.withdraw.mapper.WithdrawApplyHandleMapper;
import com.ruoyi.withdraw.domain.WithdrawApplyHandle;
import com.ruoyi.withdraw.service.IWithdrawApplyHandleService;

/**
 * 门店提现申请操作记录Service业务层处理
 *
 * @author ruoyi
 * @date 2021-11-30
 */
@Service
public class WithdrawApplyHandleServiceImpl implements IWithdrawApplyHandleService
{
    @Autowired
    private WithdrawApplyHandleMapper withdrawApplyHandleMapper;

    /**
     * 查询门店提现申请操作记录
     *
     * @param id 门店提现申请操作记录主键
     * @return 门店提现申请操作记录
     */
    @Override
    public WithdrawApplyHandle selectWithdrawApplyHandleById(Long id)
    {
        return withdrawApplyHandleMapper.selectWithdrawApplyHandleById(id);
    }

    /**
     * 查询门店提现申请操作记录列表
     *
     * @param withdrawApplyHandle 门店提现申请操作记录
     * @return 门店提现申请操作记录
     */
    @Override
    public List<WithdrawApplyHandle> selectWithdrawApplyHandleList(WithdrawApplyHandle withdrawApplyHandle)
    {
        return withdrawApplyHandleMapper.selectWithdrawApplyHandleList(withdrawApplyHandle);
    }

    /**
     * 新增门店提现申请操作记录
     *
     * @param withdrawApplyHandle 门店提现申请操作记录
     * @return 结果
     */
    @Override
    public int insertWithdrawApplyHandle(WithdrawApplyHandle withdrawApplyHandle)
    {
        withdrawApplyHandle.setCreateTime(DateUtils.getNowDate());
        return withdrawApplyHandleMapper.insertWithdrawApplyHandle(withdrawApplyHandle);
    }

    /**
     * 修改门店提现申请操作记录
     *
     * @param withdrawApplyHandle 门店提现申请操作记录
     * @return 结果
     */
    @Override
    public int updateWithdrawApplyHandle(WithdrawApplyHandle withdrawApplyHandle)
    {
        withdrawApplyHandle.setUpdateTime(DateUtils.getNowDate());
        return withdrawApplyHandleMapper.updateWithdrawApplyHandle(withdrawApplyHandle);
    }

    /**
     * 批量删除门店提现申请操作记录
     *
     * @param ids 需要删除的门店提现申请操作记录主键
     * @return 结果
     */
    @Override
    public int deleteWithdrawApplyHandleByIds(Long[] ids)
    {
        return withdrawApplyHandleMapper.deleteWithdrawApplyHandleByIds(ids);
    }


    /**
     * 批量逻辑删除门店提现申请操作记录
     *
     * @param ids 需要删除的门店提现申请操作记录主键
     * @return 结果
     */
    @Override
    public int logicDeleteWithdrawApplyHandle(Long[] ids,String delType,Long delUser)
    {
        return withdrawApplyHandleMapper.logicDeleteWithdrawApplyHandle(ids,delType,delUser);
    }

    /**
     * 删除门店提现申请操作记录信息
     *
     * @param id 门店提现申请操作记录主键
     * @return 结果
     */
    @Override
    public int deleteWithdrawApplyHandleById(Long id)
    {
        return withdrawApplyHandleMapper.deleteWithdrawApplyHandleById(id);
    }
}
